package com.ruoyi.seata.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

/**
 * @author coach tam
 * @since 1.0.0
 * 〈坚持灵活 灵活坚持〉
 */
@Configuration
public class DataSourceProxyConfig {

    @Bean(name = "seataDataSource")
    @ConfigurationProperties(prefix = "spring.datasource.dynamic.datasource.master")
    public DataSource dataSource() {
        return new DruidDataSource();
    }

}